\hypertarget{class_i_e_e_e1394_reader}{
\section{IEEE1394Reader Class Reference}
\label{class_i_e_e_e1394_reader}\index{IEEE1394Reader@{IEEE1394Reader}}
}
Inheritance diagram for IEEE1394Reader::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{class_i_e_e_e1394_reader}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_i_e_e_e1394_reader_ada9a508eb9930e3df35f8e14aaf50378}{IEEE1394Reader} (int \hyperlink{class_i_e_e_e1394_reader_ad7c6d06f144c68a17e2c09465dd4af80}{channel}=63, int frames=50, bool hdv=false)
\item 
virtual \hyperlink{class_i_e_e_e1394_reader_aeb1005e5352d8ebba0e785446551ea66}{$\sim$IEEE1394Reader} ()
\item 
\hypertarget{class_i_e_e_e1394_reader_adeb5a021817a0fa39563fb0987b22367}{
virtual bool {\bfseries StartThread} (void)=0}
\label{class_i_e_e_e1394_reader_adeb5a021817a0fa39563fb0987b22367}

\item 
\hypertarget{class_i_e_e_e1394_reader_ae99539234389e26d0114357356acabc8}{
virtual void {\bfseries StopThread} (void)=0}
\label{class_i_e_e_e1394_reader_ae99539234389e26d0114357356acabc8}

\item 
\hyperlink{class_frame}{Frame} $\ast$ \hyperlink{class_i_e_e_e1394_reader_a4812345033a9478472b174ef1633d4d1}{GetFrame} (void)
\item 
void \hyperlink{class_i_e_e_e1394_reader_a970988b4219e62098368ea96cccbfccb}{DoneWithFrame} (\hyperlink{class_frame}{Frame} $\ast$)
\item 
int \hyperlink{class_i_e_e_e1394_reader_a14e5297077010634b3b851c966df15ac}{GetDroppedFrames} (void)
\item 
int \hyperlink{class_i_e_e_e1394_reader_a1e089458425dd3283ec166d751e147e3}{GetBadFrames} (void)
\item 
\hypertarget{class_i_e_e_e1394_reader_a9f86351059a8db54fc4014bc0b8993a7}{
int {\bfseries GetOutQueueSize} (void)}
\label{class_i_e_e_e1394_reader_a9f86351059a8db54fc4014bc0b8993a7}

\item 
\hypertarget{class_i_e_e_e1394_reader_af5534e57148387468a9b4ecad3fe4c69}{
int {\bfseries GetInQueueSize} (void)}
\label{class_i_e_e_e1394_reader_af5534e57148387468a9b4ecad3fe4c69}

\item 
\hypertarget{class_i_e_e_e1394_reader_af48b7d1a1ce513c21767b6345954a6b4}{
virtual bool {\bfseries Open} (void)=0}
\label{class_i_e_e_e1394_reader_af48b7d1a1ce513c21767b6345954a6b4}

\item 
\hypertarget{class_i_e_e_e1394_reader_aa8f69526a879fce6862a548ae4c4c209}{
virtual void {\bfseries Close} (void)=0}
\label{class_i_e_e_e1394_reader_aa8f69526a879fce6862a548ae4c4c209}

\item 
\hypertarget{class_i_e_e_e1394_reader_a839679de35b79d1eed487af84105c28f}{
bool {\bfseries WaitForAction} (int seconds=0)}
\label{class_i_e_e_e1394_reader_a839679de35b79d1eed487af84105c28f}

\item 
\hypertarget{class_i_e_e_e1394_reader_ac5c3e55e4a84c85f95eea88663b09d0d}{
void {\bfseries TriggerAction} ()}
\label{class_i_e_e_e1394_reader_ac5c3e55e4a84c85f95eea88663b09d0d}

\item 
\hypertarget{class_i_e_e_e1394_reader_a16eaac9253aa20e819ccf66a4fd2517b}{
virtual bool {\bfseries StartReceive} (void)=0}
\label{class_i_e_e_e1394_reader_a16eaac9253aa20e819ccf66a4fd2517b}

\item 
\hypertarget{class_i_e_e_e1394_reader_aa6a0fb76e333806c7c0d13bd5f63c7d3}{
virtual void {\bfseries StopReceive} (void)=0}
\label{class_i_e_e_e1394_reader_aa6a0fb76e333806c7c0d13bd5f63c7d3}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_i_e_e_e1394_reader_adb555bba9fadd951ff0b47a079a40434}{Flush} (void)
\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{class_i_e_e_e1394_reader_ac8ed3b9a6c41944421854ae50a96c4bb}{droppedFrames}
\item 
\hypertarget{class_i_e_e_e1394_reader_a1cd4914e400143f77afb8442d20a2ef4}{
int {\bfseries badFrames}}
\label{class_i_e_e_e1394_reader_a1cd4914e400143f77afb8442d20a2ef4}

\item 
\hypertarget{class_i_e_e_e1394_reader_a86bc14332668c81f854725050cfbdaac}{
\hyperlink{class_frame}{Frame} $\ast$ \hyperlink{class_i_e_e_e1394_reader_a86bc14332668c81f854725050cfbdaac}{currentFrame}}
\label{class_i_e_e_e1394_reader_a86bc14332668c81f854725050cfbdaac}

\begin{DoxyCompactList}\small\item\em a pointer to the frame which is currently been transmitted \item\end{DoxyCompactList}\item 
\hypertarget{class_i_e_e_e1394_reader_a0dbf73e799370a74c95f083ee94fde03}{
deque$<$ \hyperlink{class_frame}{Frame} $\ast$ $>$ \hyperlink{class_i_e_e_e1394_reader_a0dbf73e799370a74c95f083ee94fde03}{inFrames}}
\label{class_i_e_e_e1394_reader_a0dbf73e799370a74c95f083ee94fde03}

\begin{DoxyCompactList}\small\item\em a list of empty frames \item\end{DoxyCompactList}\item 
\hypertarget{class_i_e_e_e1394_reader_a3daee6d551a97cf0e57c93258c9774cb}{
deque$<$ \hyperlink{class_frame}{Frame} $\ast$ $>$ \hyperlink{class_i_e_e_e1394_reader_a3daee6d551a97cf0e57c93258c9774cb}{outFrames}}
\label{class_i_e_e_e1394_reader_a3daee6d551a97cf0e57c93258c9774cb}

\begin{DoxyCompactList}\small\item\em a list of already received frames \item\end{DoxyCompactList}\item 
\hypertarget{class_i_e_e_e1394_reader_ad7c6d06f144c68a17e2c09465dd4af80}{
int \hyperlink{class_i_e_e_e1394_reader_ad7c6d06f144c68a17e2c09465dd4af80}{channel}}
\label{class_i_e_e_e1394_reader_ad7c6d06f144c68a17e2c09465dd4af80}

\begin{DoxyCompactList}\small\item\em the iso channel we listen to (typically == 63) \item\end{DoxyCompactList}\item 
\hypertarget{class_i_e_e_e1394_reader_a5886af157df47e6cec1e642789fa4151}{
pthread\_\-t \hyperlink{class_i_e_e_e1394_reader_a5886af157df47e6cec1e642789fa4151}{thread}}
\label{class_i_e_e_e1394_reader_a5886af157df47e6cec1e642789fa4151}

\begin{DoxyCompactList}\small\item\em contains information about our thread after calling StartThread \item\end{DoxyCompactList}\item 
pthread\_\-mutex\_\-t \hyperlink{class_i_e_e_e1394_reader_a8cddde421a2c121841b786ea1108ede5}{mutex}
\item 
\hypertarget{class_i_e_e_e1394_reader_a606502e60582db67d948fbc0b10ead2a}{
pthread\_\-mutex\_\-t {\bfseries condition\_\-mutex}}
\label{class_i_e_e_e1394_reader_a606502e60582db67d948fbc0b10ead2a}

\item 
\hypertarget{class_i_e_e_e1394_reader_a1b3b967c5e869eaa70d77aefbbf45340}{
pthread\_\-cond\_\-t {\bfseries condition}}
\label{class_i_e_e_e1394_reader_a1b3b967c5e869eaa70d77aefbbf45340}

\item 
\hypertarget{class_i_e_e_e1394_reader_aa33475674fa8d7a71abe6974df03e2c7}{
bool \hyperlink{class_i_e_e_e1394_reader_aa33475674fa8d7a71abe6974df03e2c7}{isRunning}}
\label{class_i_e_e_e1394_reader_aa33475674fa8d7a71abe6974df03e2c7}

\begin{DoxyCompactList}\small\item\em A state variable for starting and stopping thread. \item\end{DoxyCompactList}\item 
\hypertarget{class_i_e_e_e1394_reader_a2f97199033acb467120c6a8a0f5ec898}{
bool \hyperlink{class_i_e_e_e1394_reader_a2f97199033acb467120c6a8a0f5ec898}{isHDV}}
\label{class_i_e_e_e1394_reader_a2f97199033acb467120c6a8a0f5ec898}

\begin{DoxyCompactList}\small\item\em If this is handling DV or HDV. \item\end{DoxyCompactList}\item 
\hypertarget{class_i_e_e_e1394_reader_afb25b5a6494743ff678e65da3b82e596}{
\hyperlink{class_h_d_v_stream_params}{HDVStreamParams} {\bfseries hdvStreamParams}}
\label{class_i_e_e_e1394_reader_afb25b5a6494743ff678e65da3b82e596}

\end{DoxyCompactItemize}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_i_e_e_e1394_reader_ada9a508eb9930e3df35f8e14aaf50378}{
\index{IEEE1394Reader@{IEEE1394Reader}!IEEE1394Reader@{IEEE1394Reader}}
\index{IEEE1394Reader@{IEEE1394Reader}!IEEE1394Reader@{IEEE1394Reader}}
\subsubsection[{IEEE1394Reader}]{\setlength{\rightskip}{0pt plus 5cm}IEEE1394Reader::IEEE1394Reader (int {\em c} = {\ttfamily 63}, \/  int {\em bufSize} = {\ttfamily 50}, \/  bool {\em hdv} = {\ttfamily false})}}
\label{class_i_e_e_e1394_reader_ada9a508eb9930e3df35f8e14aaf50378}
Initializes the \hyperlink{class_i_e_e_e1394_reader}{IEEE1394Reader} object.

The object is initialized with port and channel number. These parameters define the interface card and the iso channel on which the camcorder sends its data.

The object contains a list of empty frames, which are allocated here. 50 frames (2 seconds) should be enough in most cases.


\begin{DoxyParams}{Parameters}
\item[{\em c}]the iso channel number to use \item[{\em bufSize}]the number of frames to allocate for the frames buffer \end{DoxyParams}
\hypertarget{class_i_e_e_e1394_reader_aeb1005e5352d8ebba0e785446551ea66}{
\index{IEEE1394Reader@{IEEE1394Reader}!$\sim$IEEE1394Reader@{$\sim$IEEE1394Reader}}
\index{$\sim$IEEE1394Reader@{$\sim$IEEE1394Reader}!IEEE1394Reader@{IEEE1394Reader}}
\subsubsection[{$\sim$IEEE1394Reader}]{\setlength{\rightskip}{0pt plus 5cm}IEEE1394Reader::$\sim$IEEE1394Reader ()\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_i_e_e_e1394_reader_aeb1005e5352d8ebba0e785446551ea66}
Destroys the \hyperlink{class_i_e_e_e1394_reader}{IEEE1394Reader} object.

In particular, it deletes all frames in the inFrames and outFrames queues, as well as the one currently in use. Note that one or more frames may have been taken out of the queues by a user of the \hyperlink{class_i_e_e_e1394_reader}{IEEE1394Reader} class. 

\subsection{Member Function Documentation}
\hypertarget{class_i_e_e_e1394_reader_a970988b4219e62098368ea96cccbfccb}{
\index{IEEE1394Reader@{IEEE1394Reader}!DoneWithFrame@{DoneWithFrame}}
\index{DoneWithFrame@{DoneWithFrame}!IEEE1394Reader@{IEEE1394Reader}}
\subsubsection[{DoneWithFrame}]{\setlength{\rightskip}{0pt plus 5cm}void IEEE1394Reader::DoneWithFrame ({\bf Frame} $\ast$ {\em frame})}}
\label{class_i_e_e_e1394_reader_a970988b4219e62098368ea96cccbfccb}
Put back a frame to the queue of available frames \hypertarget{class_i_e_e_e1394_reader_adb555bba9fadd951ff0b47a079a40434}{
\index{IEEE1394Reader@{IEEE1394Reader}!Flush@{Flush}}
\index{Flush@{Flush}!IEEE1394Reader@{IEEE1394Reader}}
\subsubsection[{Flush}]{\setlength{\rightskip}{0pt plus 5cm}void IEEE1394Reader::Flush (void)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_i_e_e_e1394_reader_adb555bba9fadd951ff0b47a079a40434}
Throw away all currently available frames.

All frames in the outFrames queue are put back to the inFrames queue. Also the currentFrame is put back too. \hypertarget{class_i_e_e_e1394_reader_a1e089458425dd3283ec166d751e147e3}{
\index{IEEE1394Reader@{IEEE1394Reader}!GetBadFrames@{GetBadFrames}}
\index{GetBadFrames@{GetBadFrames}!IEEE1394Reader@{IEEE1394Reader}}
\subsubsection[{GetBadFrames}]{\setlength{\rightskip}{0pt plus 5cm}int IEEE1394Reader::GetBadFrames (void)}}
\label{class_i_e_e_e1394_reader_a1e089458425dd3283ec166d751e147e3}
Return the number of incomplete frames since last call \hypertarget{class_i_e_e_e1394_reader_a14e5297077010634b3b851c966df15ac}{
\index{IEEE1394Reader@{IEEE1394Reader}!GetDroppedFrames@{GetDroppedFrames}}
\index{GetDroppedFrames@{GetDroppedFrames}!IEEE1394Reader@{IEEE1394Reader}}
\subsubsection[{GetDroppedFrames}]{\setlength{\rightskip}{0pt plus 5cm}int IEEE1394Reader::GetDroppedFrames (void)}}
\label{class_i_e_e_e1394_reader_a14e5297077010634b3b851c966df15ac}
Return the number of dropped frames since last call \hypertarget{class_i_e_e_e1394_reader_a4812345033a9478472b174ef1633d4d1}{
\index{IEEE1394Reader@{IEEE1394Reader}!GetFrame@{GetFrame}}
\index{GetFrame@{GetFrame}!IEEE1394Reader@{IEEE1394Reader}}
\subsubsection[{GetFrame}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Frame} $\ast$ IEEE1394Reader::GetFrame (void)}}
\label{class_i_e_e_e1394_reader_a4812345033a9478472b174ef1633d4d1}
Fetches the next frame from the output queue

The outFrames contains a list of frames to be processed (saved, displayed) by the user of this class. Copy the first frame (actually only a pointer to it) and remove it from the queue.

\begin{DoxyNote}{Note}
If this returns NULL, wait some time (1/25 sec.) before calling it again.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
a pointer to the current frame, or NULL if no frames are in the queue 
\end{DoxyReturn}


\subsection{Member Data Documentation}
\hypertarget{class_i_e_e_e1394_reader_ac8ed3b9a6c41944421854ae50a96c4bb}{
\index{IEEE1394Reader@{IEEE1394Reader}!droppedFrames@{droppedFrames}}
\index{droppedFrames@{droppedFrames}!IEEE1394Reader@{IEEE1394Reader}}
\subsubsection[{droppedFrames}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf IEEE1394Reader::droppedFrames}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_i_e_e_e1394_reader_ac8ed3b9a6c41944421854ae50a96c4bb}
the number of frames that had to be thrown away because our inFrames queue did not contain available frames \hypertarget{class_i_e_e_e1394_reader_a8cddde421a2c121841b786ea1108ede5}{
\index{IEEE1394Reader@{IEEE1394Reader}!mutex@{mutex}}
\index{mutex@{mutex}!IEEE1394Reader@{IEEE1394Reader}}
\subsubsection[{mutex}]{\setlength{\rightskip}{0pt plus 5cm}pthread\_\-mutex\_\-t {\bf IEEE1394Reader::mutex}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{class_i_e_e_e1394_reader_a8cddde421a2c121841b786ea1108ede5}
this mutex protects capture related variables that could possibly accessed from two threads at the same time 

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/cv/ext/dvgrab/ieee1394io.h\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/cv/ext/dvgrab/ieee1394io.cc\end{DoxyCompactItemize}
